<?php
// 会员信息
delorlogsess();
$user   = $_SESSION[$G_front_session_key];
if($user['members_uid'] > 0) {
    $userinfo   = member_info($user['members_uid']);
}

if($this_cata_id==5){//关于我们
    $class_group = article_list(array('cid' => $this_cata_id,'orderby0'=>'cata_order|desc'));
    if(!$aid){
        $aid=$class_group[0]['aid'];
    }
}elseif($this_cata_id==1){//项目
    if(!$cid){
        $cid=$this_cata_id;
    }
    $class_group=class_list(array('cid'	=> $this_cata_id));
}else{        
    $class_group=class_list(array('cid'	=> $this_cata_id));
    if(!$cid&&!$aid){
        $cid=$class_group[0]['cid'];
    }elseif($cid){
        $hs=0;
        foreach($class_group as $v){
            if($v['cid']==$cid){
                $hs=1;
            }
        }
        if(!$hs){
            $cid=$class_group[0]['cid'];
        }
    }
}

$tpl->assign(array(
    'user'      => $user,
    'userinfo'  => $userinfo,
    'menu_id'	=> $this_cata_id,
    'class_group'=>$class_group,
    'page'      => $_GET['page']
));
?>